Optimal. Leaf size=322 \[ -\frac {\log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )}{f}+\frac {\log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \log \left (1-\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )}{f}-\frac {2 \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \text {Li}_2\left (\frac {b (c+d x)}{d (a+b x)}\right )}{f}+\frac {2 \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \text {Li}_2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )}{f}+\frac {2 \text {Li}_3\left (\frac {b (c+d x)}{d (a+b x)}\right )}{f}-\frac {2 \text {Li}_3\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.31, antiderivative size = 322, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 5, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.119, Rules used = {2554, 2404,
2354, 2421, 6724} \begin {gather*} -\frac {2 \text {PolyLog}\left (3,\frac {(c+d x) (b e-a f)}{(a+b x) (d e-c f)}\right )}{f}-\frac {2 \text {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right ) \log \left (\frac {(c+d x) (b e-a f)}{(a+b x) (d e-c f)}\right )}{f}+\frac {2 \log \left (\frac {(c+d x) (b e-a f)}{(a+b x) (d e-c f)}\right ) \text {PolyLog}\left (2,\frac {(c+d x) (b e-a f)}{(a+b x) (d e-c f)}\right )}{f}+\frac {2 \text {PolyLog}\left (3,\frac {b (c+d x)}{d (a+b x)}\right )}{f}-\frac {\log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log ^2\left (\frac {(c+d x) (b e-a f)}{(a+b x) (d e-c f)}\right )}{f}+\frac {\log \left (1-\frac {(c+d x) (b e-a f)}{(a+b x) (d e-c f)}\right ) \log ^2\left (\frac {(c+d x) (b e-a f)}{(a+b x) (d e-c f)}\right )}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2354
Rule 2404
Rule 2421
Rule 2554
Rule 6724
Rubi steps
\begin {align*} \int \frac {\log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )}{e+f x} \, dx &=\frac {d \int \frac {\log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )}{c+d x} \, dx}{f}-\frac {(d e-c f) \int \frac {\log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )}{(c+d x) (e+f x)} \, dx}{f}\\ &=-\frac {\log \left (\frac {b c-a d}{b (c+d x)}\right ) \log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )}{f}+\frac {\log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \log \left (\frac {(b c-a d) (e+f x)}{(b e-a f) (c+d x)}\right )}{f}-\frac {(2 (b c-a d)) \int \frac {\log \left (-\frac {-b c+a d}{b (c+d x)}\right ) \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )}{(a+b x) (c+d x)} \, dx}{f}+\frac {(2 (b c-a d)) \int \frac {\log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \log \left (-\frac {(-b c+a d) (e+f x)}{(b e-a f) (c+d x)}\right )}{(a+b x) (c+d x)} \, dx}{f}\\ &=-\frac {\log \left (\frac {b c-a d}{b (c+d x)}\right ) \log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )}{f}+\frac {\log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \log \left (\frac {(b c-a d) (e+f x)}{(b e-a f) (c+d x)}\right )}{f}+\frac {2 \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \text {Li}_2\left (1-\frac {b c-a d}{b (c+d x)}\right )}{f}-\frac {2 \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \text {Li}_2\left (1-\frac {(b c-a d) (e+f x)}{(b e-a f) (c+d x)}\right )}{f}+\frac {(2 (b c-a d)) \int \frac {\text {Li}_2\left (1+\frac {-b c+a d}{b (c+d x)}\right )}{(a+b x) (c+d x)} \, dx}{f}-\frac {(2 (b c-a d)) \int \frac {\text {Li}_2\left (1+\frac {(-b c+a d) (e+f x)}{(b e-a f) (c+d x)}\right )}{(a+b x) (c+d x)} \, dx}{f}\\ &=-\frac {\log \left (\frac {b c-a d}{b (c+d x)}\right ) \log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )}{f}+\frac {\log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \log \left (\frac {(b c-a d) (e+f x)}{(b e-a f) (c+d x)}\right )}{f}+\frac {2 \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \text {Li}_2\left (1-\frac {b c-a d}{b (c+d x)}\right )}{f}-\frac {2 \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \text {Li}_2\left (1-\frac {(b c-a d) (e+f x)}{(b e-a f) (c+d x)}\right )}{f}+\frac {2 \text {Li}_3\left (1-\frac {b c-a d}{b (c+d x)}\right )}{f}-\frac {2 \text {Li}_3\left (1-\frac {(b c-a d) (e+f x)}{(b e-a f) (c+d x)}\right )}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(1080\) vs. \(2(322)=644\).
time = 0.15, size = 1080, normalized size = 3.35 \begin {gather*} \frac {-\log \left (\frac {-b c+a d}{d (a+b x)}\right ) \log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )+\log ^2\left (\frac {a}{b}+x\right ) \log (e+f x)-2 \log \left (\frac {a}{b}+x\right ) \log \left (\frac {c}{d}+x\right ) \log (e+f x)+\log ^2\left (\frac {c}{d}+x\right ) \log (e+f x)+2 \log \left (\frac {a}{b}+x\right ) \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \log (e+f x)-2 \log \left (\frac {c}{d}+x\right ) \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \log (e+f x)+\log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \log (e+f x)-\log ^2\left (\frac {a}{b}+x\right ) \log \left (\frac {b (e+f x)}{b e-a f}\right )+2 \log \left (\frac {a}{b}+x\right ) \log \left (\frac {f (c+d x)}{-d e+c f}\right ) \log \left (\frac {b (e+f x)}{b e-a f}\right )-\log ^2\left (\frac {f (c+d x)}{-d e+c f}\right ) \log \left (\frac {b (e+f x)}{b e-a f}\right )-2 \log \left (\frac {a}{b}+x\right ) \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \log \left (\frac {b (e+f x)}{b e-a f}\right )+2 \log \left (\frac {f (c+d x)}{-d e+c f}\right ) \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \log \left (\frac {b (e+f x)}{b e-a f}\right )-\log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \log \left (\frac {b (e+f x)}{b e-a f}\right )+2 \log \left (\frac {a}{b}+x\right ) \log \left (\frac {c}{d}+x\right ) \log \left (\frac {d (e+f x)}{d e-c f}\right )-\log ^2\left (\frac {c}{d}+x\right ) \log \left (\frac {d (e+f x)}{d e-c f}\right )-2 \log \left (\frac {a}{b}+x\right ) \log \left (\frac {f (c+d x)}{-d e+c f}\right ) \log \left (\frac {d (e+f x)}{d e-c f}\right )+\log ^2\left (\frac {f (c+d x)}{-d e+c f}\right ) \log \left (\frac {d (e+f x)}{d e-c f}\right )+2 \log \left (\frac {c}{d}+x\right ) \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \log \left (\frac {d (e+f x)}{d e-c f}\right )-2 \log \left (\frac {f (c+d x)}{-d e+c f}\right ) \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \log \left (\frac {d (e+f x)}{d e-c f}\right )+\log ^2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \log \left (\frac {(-b c+a d) (e+f x)}{(d e-c f) (a+b x)}\right )-2 \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \text {Li}_2\left (\frac {b (c+d x)}{d (a+b x)}\right )+2 \log \left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right ) \text {Li}_2\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )+2 \text {Li}_3\left (\frac {b (c+d x)}{d (a+b x)}\right )-2 \text {Li}_3\left (\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(812\) vs.
\(2(321)=642\).
time = 0.93, size = 813, normalized size = 2.52
method | result | size |
derivativedivides | \(\left (a f -b e \right ) \left (a d -c b \right ) \left (\frac {\ln \left (-\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right )^{2} \ln \left (\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}-\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}+1\right )+2 \ln \left (-\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right ) \polylog \left (2, -\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right )-2 \polylog \left (3, -\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right )}{\left (a f -b e \right ) f \left (a d -c b \right )}-\frac {b \left (c f -e d \right ) \left (\ln \left (-\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right )^{2} \ln \left (1+\frac {\left (b c f -b d e \right ) \left (-\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right )}{-a d f +b d e}\right )+2 \ln \left (-\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right ) \polylog \left (2, -\frac {\left (b c f -b d e \right ) \left (-\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right )}{-a d f +b d e}\right )-2 \polylog \left (3, -\frac {\left (b c f -b d e \right ) \left (-\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right )}{-a d f +b d e}\right )\right )}{\left (b c f -b d e \right ) \left (a f -b e \right ) f \left (a d -c b \right )}\right )\) | \(813\) |
default | \(\left (a f -b e \right ) \left (a d -c b \right ) \left (\frac {\ln \left (-\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right )^{2} \ln \left (\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}-\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}+1\right )+2 \ln \left (-\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right ) \polylog \left (2, -\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right )-2 \polylog \left (3, -\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right )}{\left (a f -b e \right ) f \left (a d -c b \right )}-\frac {b \left (c f -e d \right ) \left (\ln \left (-\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right )^{2} \ln \left (1+\frac {\left (b c f -b d e \right ) \left (-\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right )}{-a d f +b d e}\right )+2 \ln \left (-\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right ) \polylog \left (2, -\frac {\left (b c f -b d e \right ) \left (-\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right )}{-a d f +b d e}\right )-2 \polylog \left (3, -\frac {\left (b c f -b d e \right ) \left (-\frac {\left (a f -b e \right ) \left (a d -c b \right )}{b \left (c f -e d \right ) \left (b x +a \right )}+\frac {d \left (a f -b e \right )}{\left (c f -e d \right ) b}\right )}{-a d f +b d e}\right )\right )}{\left (b c f -b d e \right ) \left (a f -b e \right ) f \left (a d -c b \right )}\right )\) | \(813\) |
risch | \(\text {Expression too large to display}\) | \(4733\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\ln \left (\frac {\left (a\,f-b\,e\right )\,\left (c+d\,x\right )}{\left (c\,f-d\,e\right )\,\left (a+b\,x\right )}\right )}^2}{e+f\,x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________